package com.shuzhi.dataway.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Siyuan.mlq
 * @version 1.0
 * @description
 * @since 2020/10/21
 */
@Mapper
public interface UserDao {

    @Results({
            @Result(property = "id",column = "id"),
            @Result(property = "userName",column = "user_name"),
            @Result(property = "age",column = "age")
    })
    @Select("select * from user where age =#{age}")
    List<User> getByAge(int age);
}
